#include <stdio.h>
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <stdint.h>
#include <cstdlib>
#include <rockit/RTTaskNodeContext.h>
#include <rockit/RTTaskNode.h>
#include <rockit/RTMediaBuffer.h>
#include "../common/cae_intf.h"

#define kStubRockitDemo MKTAG('r', 'k', 'd', 'm')

extern CAE_HANDLE cae;

// 创建外部节点， 外部节点需要继承RTTaskNode
// 基础接口需要完成open/process/close
class RTRockitDemoNode : public RTTaskNode
{
public:
    RTRockitDemoNode() {}
    virtual ~RTRockitDemoNode() {}

    virtual RT_RET open(RTTaskNodeContext *context);
    virtual RT_RET process(RTTaskNodeContext *context);
    virtual RT_RET close(RTTaskNodeContext *context);

private:
    RT_RET doAIProcess(RTMediaBuffer *src, RTMediaBuffer *dst);
};

RTTaskNode *createRockitDemoNode();
